<extend name="public:base" />
<block name="breadcrumb">
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-book"></i>
            <a href="index">{:L('系统管理')}</a>
        </li>
        <li class="active">{:L('用户权限')}</li>
    </ul>
</block>
<block name="c-block">
    <div class="main-content">
            <!-- #section:settings.box -->

            <!-- /.ace-settings-container -->

            <!-- /section:settings.box -->
            <div class="page-content-area">

                <div class="page-header">
                    <h1>
                        活動管理            <small>
                        <i class="ace-icon fa fa-angle-double-right"></i>
                        活動列表            </small>
                        <ul class="nav navbar-nav navbar-right">
                            <button class="btn btn-sm btn-primary" onclick="openDialog('{:U('actAdd')}', '新增活動');">
                                <i class="fa fa-plus"></i> 新增活動 </button>
                        </ul>
                    </h1>
                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->

                        <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>活動名稱</th>
                                <th>活動介紹</th>
                                <th>活動圖片</th>
                                <th>價錢</th>
                                <th>狀態</th>
                                <th>活動時間</th>
                                <th>创建时间</th>
                                <th class="text-right">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="lists" id="vo" empty="暂没相关数据">
                                <tr id="id_{$vo.id}">
                                    <td>{$vo['id']}</td>
                                    <td >{$vo['activityname']}</td>
                                    <td >{$vo['content']}</td>
                                    <td >{$vo['img']}</td>
                                    <td >{$vo['total']}</td>
                                    <td >
                                        <label>
                                            <input name="" value="1" <?php if($vo['status'] == 1){echo "checked";}?> class="ace ace-switch ace-switch-3 ajax-switch" type="checkbox" data-action="{:U('actStatus',['id'=>$vo['id']])}" >
                                            <span class="lbl"></span>
                                        </label>
                                    </td>
                                    <td >{$vo['activity_time']}</td>
                                    <td >{$vo['add_time']|date="Y-m-d H:i",###}</td>
                                    <td class="text-right">
                                        <button class="btn btn-xs btn-info" onclick="openDialog('{:U('actEdit',['id'=>$vo['id']])}', '修改活動');">
                                            <i class="ace-icon fa fa-pencil bigger-120"></i>
                                        </button>
                                        <button class="btn btn-xs btn-danger delete confirm" data-rel="确定删除吗？" data-action="{:U('actDel',['id'=>$vo['id']])}">
                                            <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                        </button>
                                    </td>
                                </tr>
                            </volist>
                            <tr>
                                <td colspan="12">
                                <ul class="pagination">
                                </ul>
                            </td>
                            </tr>
                            </tbody>
                        </table>
                        <!-- PAGE CONTENT ENDS -->
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.page-content-area -->
    </div>
</block>
